﻿@using _2009035.Utilities;
@{
    ViewBag.Title = "Manage";
}


<div class="span10">
    <h2>Manage</h2>
    <br />
    <br />

    <div>
        <input type="button" class="ui-button-primary ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
            id="btnAddNewEmployee" value="Add New Employee" />
    </div>
    <br />
    <br />
    <div class="ui-state-default ui-corner-all" style="width: 155px;">
        <p>
            <strong>Find Employee</strong>
        </p>
    </div>
    <br />
    @Html.Partial("KendoGrid")
</div>

<div id="wiji" title="Dialog Title">
    <form id="frmAddEmployee">
        <table>
            <tr>
                <td>
                    <div class="editor-label">
                        <label>First Name</label>
                    </div>
                </td>
                <td>
                    <div class="editor-field">
                        <input type="text" name="employee.firstName" required />
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="editor-label">
                        <label>Last Name</label>
                    </div>

                </td>
                <td>
                    <div class="editor-field">
                        <input type="text" name="employee.lastName" required />
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="editor-label">
                        <label>Birth Date</label>
                    </div>
                </td>
                <td>
                    <div class="editor-field">
                        <input type="text" id="birthDate" name="employee.birthDate" class="datefield" value=""
                            required />
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="editor-label">
                        <label>Gender</label>
                    </div>
                </td>
                <td>

                    <div class="editor-field">

                        <select name="employee.gender">
                            @{var genders = Enum.GetValues(typeof(Gender)).Cast<Gender>();
                              foreach (var singleGender in genders)
                              {
                                  if (singleGender != Gender.Both)
                                  {
                                <option value=@singleGender.ToString()>@Utility.GetEnumDescription(singleGender)
                                </option>
                                  }

                              }
                    
                            }

                        </select>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="editor-label">
                        <label>Hire Date</label>
                    </div>

                </td>
                <td>
                    <div class="editor-field">
                        <input type="text" id="hireDate" name="employee.hireDate" class="datefield" value=""
                            required />
                    </div>
                </td>
            </tr>

            <tr>
                <td>
                    <div class="editor-label">
                        <label>Title</label>
                    </div>

                </td>
                <td>
                    <div class="editor-field">

                        <select name="employee.title">
                            @{var titles = Enum.GetValues(typeof(Titles)).Cast<Titles>();
                              foreach (var singletitle in titles)
                              {
                                  if (singletitle != Titles.All)
                                  {
                                <option value=@singletitle.ToString()>@Utility.GetEnumDescription(singletitle) </option>
                                  }

                              }
                    
                            }

                        </select>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="editor-label">
                        <label>Salary</label>
                    </div>

                </td>
                <td>
                    <div class="editor-field">
                        <input type="text" name="employee.salary" title="" pattern="\d*" required oninvalid="this.setCustomValidity('Please enter a whole number')" />
                    </div>
                </td>
            </tr>

            <tr>
                <td>
                    <div class="editor-label">
                        <label>Department</label>
                    </div>

                </td>
                <td>
                    <div class="editor-field">

                        <select name="employee.department">
                            @{var departments = Enum.GetValues(typeof(Departments)).Cast<Departments>();
                              foreach (var singleDepartment in departments)
                              {
                                  if (singleDepartment != Departments.All)
                                  {
                                <option value=@singleDepartment.ToString()>@Utility.GetEnumDescription(singleDepartment)
                                </option>
                                  }

                              }
                    
                            }

                        </select>
                    </div>

                </td>
            </tr>

        </table>
        <input class="btn" type="submit" value="Login" style="visibility: hidden">
    </form>
</div>

